import Mock from 'mockjs'
import homeData from './components/home'
import login from './components/login'
import city from './components/city'

Mock.setup({
  timeout: '10-100'
})

// 拦截的是 /home/getData
// 正则表达式: / /  ; 转义符：\
Mock.mock(/\/home\/getData/, 'get', homeData.getHomeData) // 首页数据
Mock.mock(/\/login/, 'post', login.getResult) // 登录
Mock.mock(/\/city/, 'get', city.getCityList) // 城市列表
